home *** CD-ROM | disk | FTP | other *** search
/ Stolen Data 3 / Stolen Data 3.adf / MAG-TEXT / CODE4b < prev    next >
Text File  |  1989-01-01  |  1KB  |  31 lines

  1. it  is to be displayed is only 46 bytes
  2. across  you must tell the video chip to
  3. skip  34  bytes  after displaying every
  4. line.   This  is  accomplished  through
  5. setting  the  Modulo values to 34.  For
  6. more   information   see  the  relevant
  7. manual  (  Systems  Guide  or  Hardware
  8. reference.)
  9.     Taking  the  above example a little
  10. further  (the  included source is based
  11. on  this) we will consider how to write
  12. such  a  double  buffered scroller.  We
  13. can only traverse 34 bytes (272 pixels)
  14. before  the buffer runs out, so we must
  15. swap buffers before then.  A counter is
  16. incremented  with  the  scrolling speed
  17. every frame, and this is then converted
  18. into  bitplane  pointers  and  hardware
  19. scrolling  registers.   If  the counter
  20. exceeds a certain limit (In my case 256
  21. pixels) which MUST be less than the 272
  22. pixel range we calculated earlier, then
  23. the   limit   is  subtracted  from  the
  24. counter.   At  the  same  time  the two
  25. buffers   are   swapped.   I  think  an
  26. example will explain this better
  27.   eg.   (following  the  convention for
  28. variables I mentioned earlier in the RS
  29. opcode discussion)
  30.  
  31.